package ExpressThree;

public class IONode {
    private final String identifyName;//设备识别名字
    private final LinkList<ProcessNode>list_waiting;//等待队列
    private IONode next;
    private ProcessNode processNode=null;
    IONode(String identifyName){
        next=null;
        this.identifyName=identifyName;
        list_waiting=new LinkList<>();
    }

    public void setProcessNode(ProcessNode processNode) {
        this.processNode = processNode;
    }

    public ProcessNode getProcessNode() {
        return processNode;
    }

    public void setNext(IONode next) {
        this.next = next;
    }
    public void addInTOWaiting(ProcessNode node){
        if(node!=null){
            list_waiting.add(node);
        }
    }

    public IONode getNext() {
        return next;
    }

    public String getIdentifyName() {
        return identifyName;
    }

    public LinkList<ProcessNode> getList_waiting() {
        return list_waiting;
    }


    @Override
    public String toString() {
        return "IONode\n" +
                "identifyName='" + identifyName + '\'' +
                ", processNode=" + processNode +
                ", next=" + next;
    }
}
